package com.igeekhome.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.igeekhome.pojo.WorkQualityStatistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 工作质量统计 Mapper 接口
 * </p>
 *
 * @author ${毛宇}
 * @since 2021-03-16
 */
public interface WorkQualityStatisticsMapper extends BaseMapper<WorkQualityStatistics> {
    @Select("select Sum(effectiveSessionCount) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumeffsess(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(resolved) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumresolve(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(unsolved) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumunsolve(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(goodReview) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumgood(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(mediumReview) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumdedium(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(badReview) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumbad(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Sum(noReview) from work_quality_statistics ${ew.customSqlSegment}")
    int getsumno(@Param(Constants.WRAPPER) Wrapper wrapper);
}
